package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/13 20:12
 * 邮箱：648859026@qq.com
 */
public class FeedbackSetAction extends AHttpService<PbBean.PbResSystemSetFeedback>{
    /**
     * 提交意见反馈信息
     * @param context
     * @param description 意见反馈
     * @return
     */
    public static FeedbackSetAction newInstance(Context context, String description){
        return new FeedbackSetAction(context, description);
    }
    private String description;
    private FeedbackSetAction(Context context, String description) {
        super(context);
        this.description = description;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqSystemSetFeedback.Builder builder = PbBean.PbReqSystemSetFeedback.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setDescription(description);

        return apiService.feedbackSet(builder.build());
    }
}
